package com.fdb.efp.nls.service.impl;

import com.fdb.basic.framework.core.cache.Cache;
import com.fdb.basic.framework.core.cache.PiccsFrameworkCache;
import com.fdb.basic.framework.core.util.SpringContextUtils;
import com.fdb.efp.nls.service.facade.CacheManagerService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import java.util.Objects;

/**
 * 
 * 
 * 
 * @author Cytus_
 * @since 2018年6月14日 上午9:30:45
 * @version 1.0
 *
 */
@Service("cacheManagerService")
public class CacheManagerServiceImpl implements CacheManagerService {
    
	private static Logger logger = LoggerFactory.getLogger(CacheManagerServiceImpl.class);

	@Override
	public PiccsFrameworkCache getCache() {
		PiccsFrameworkCache bean = (PiccsFrameworkCache) SpringContextUtils.getBean(Cache.CACHE_BEAN);
		if (Objects.nonNull(bean)) {
			return bean;
		}
		return null;
	}


}
